/*
 * @Description: 
 * @Author: 天涯过客
 * @Date: 2025-05-20 16:28:27
 */

//if and while,½×³Ë
int main()
{
  int i,factor,n;
  i=0;
  scanf(n);
  if(n<1)     {
      factor=0;
    }
  else {
    factor=1;
  }
  while(i<n)
    {
      i=i+1;
      factor=factor*i;
    }
  printf(factor);
}
